3.282 \(\int \frac {\sec ^2(e+f x)}{\sqrt {a+b \sec (e+f x)} (c+d \sec (e+f x))} \, dx\)

Optimal. Leaf size=209 \[ \frac {2 \sqrt {a+b} \cot (e+f x) \sqrt {\frac {b (1-\sec (e+f x))}{a+b}} \sqrt {-\frac {b (\sec (e+f x)+1)}{a-b}} F\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (e+f x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{b d f}-\frac {2 c \tan (e+f x) \sqrt {\frac {a+b \sec (e+f x)}{a+b}} \Pi \left (\frac {2 d}{c+d};\sin ^{-1}\left (\frac {\sqrt {1-\sec (e+f x)}}{\sqrt {2}}\right )|\frac {2 b}{a+b}\right )}{d f (c+d) \sqrt {-\tan ^2(e+f x)} \sqrt {a+b \sec (e+f x)}} \]

[Out]

2*cot(f*x+e)*EllipticF((a+b*sec(f*x+e))^(1/2)/(a+b)^(1/2),((a+b)/(a-b))^(1/2))*(a+b)^(1/2)*(b*(1-sec(f*x+e))/(
a+b))^(1/2)*(-b*(1+sec(f*x+e))/(a-b))^(1/2)/b/d/f-2*c*EllipticPi(1/2*(1-sec(f*x+e))^(1/2)*2^(1/2),2*d/(c+d),2^
(1/2)*(b/(a+b))^(1/2))*((a+b*sec(f*x+e))/(a+b))^(1/2)*tan(f*x+e)/d/(c+d)/f/(a+b*sec(f*x+e))^(1/2)/(-tan(f*x+e)
^2)^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.36, antiderivative size = 209, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.086, Rules used = {3977, 3832, 3973} \[ \frac {2 \sqrt {a+b} \cot (e+f x) \sqrt {\frac {b (1-\sec (e+f x))}{a+b}} \sqrt {-\frac {b (\sec (e+f x)+1)}{a-b}} F\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (e+f x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{b d f}-\frac {2 c \tan (e+f x) \sqrt {\frac {a+b \sec (e+f x)}{a+b}} \Pi \left (\frac {2 d}{c+d};\sin ^{-1}\left (\frac {\sqrt {1-\sec (e+f x)}}{\sqrt {2}}\right )|\frac {2 b}{a+b}\right )}{d f (c+d) \sqrt {-\tan ^2(e+f x)} \sqrt {a+b \sec (e+f x)}} \]

Antiderivative was successfully verified.

[In]

Int[Sec[e + f*x]^2/(Sqrt[a + b*Sec[e + f*x]]*(c + d*Sec[e + f*x])),x]

[Out]

(2*Sqrt[a + b]*Cot[e + f*x]*EllipticF[ArcSin[Sqrt[a + b*Sec[e + f*x]]/Sqrt[a + b]], (a + b)/(a - b)]*Sqrt[(b*(
1 - Sec[e + f*x]))/(a + b)]*Sqrt[-((b*(1 + Sec[e + f*x]))/(a - b))])/(b*d*f) - (2*c*EllipticPi[(2*d)/(c + d),
ArcSin[Sqrt[1 - Sec[e + f*x]]/Sqrt[2]], (2*b)/(a + b)]*Sqrt[(a + b*Sec[e + f*x])/(a + b)]*Tan[e + f*x])/(d*(c
+ d)*f*Sqrt[a + b*Sec[e + f*x]]*Sqrt[-Tan[e + f*x]^2])

Rule 3832

Int[csc[(e_.) + (f_.)*(x_)]/Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)], x_Symbol] :> Simp[(-2*Rt[a + b, 2]*Sqr
t[(b*(1 - Csc[e + f*x]))/(a + b)]*Sqrt[-((b*(1 + Csc[e + f*x]))/(a - b))]*EllipticF[ArcSin[Sqrt[a + b*Csc[e +
f*x]]/Rt[a + b, 2]], (a + b)/(a - b)])/(b*f*Cot[e + f*x]), x] /; FreeQ[{a, b, e, f}, x] && NeQ[a^2 - b^2, 0]

Rule 3973

Int[csc[(e_.) + (f_.)*(x_)]/(Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)]*(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))
), x_Symbol] :> Simp[(-2*Cot[e + f*x]*Sqrt[(a + b*Csc[e + f*x])/(a + b)]*EllipticPi[(2*d)/(c + d), ArcSin[Sqrt
[1 - Csc[e + f*x]]/Sqrt[2]], (2*b)/(a + b)])/(f*(c + d)*Sqrt[a + b*Csc[e + f*x]]*Sqrt[-Cot[e + f*x]^2]), x] /;
 FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0]

Rule 3977

Int[csc[(e_.) + (f_.)*(x_)]^2/(Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)]*(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_
))), x_Symbol] :> Dist[1/d, Int[Csc[e + f*x]/Sqrt[a + b*Csc[e + f*x]], x], x] - Dist[c/d, Int[Csc[e + f*x]/(Sq
rt[a + b*Csc[e + f*x]]*(c + d*Csc[e + f*x])), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && N
eQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0]

Rubi steps

\begin {align*} \int \frac {\sec ^2(e+f x)}{\sqrt {a+b \sec (e+f x)} (c+d \sec (e+f x))} \, dx &=\frac {\int \frac {\sec (e+f x)}{\sqrt {a+b \sec (e+f x)}} \, dx}{d}-\frac {c \int \frac {\sec (e+f x)}{\sqrt {a+b \sec (e+f x)} (c+d \sec (e+f x))} \, dx}{d}\\ &=\frac {2 \sqrt {a+b} \cot (e+f x) F\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (e+f x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (e+f x))}{a+b}} \sqrt {-\frac {b (1+\sec (e+f x))}{a-b}}}{b d f}-\frac {2 c \Pi \left (\frac {2 d}{c+d};\sin ^{-1}\left (\frac {\sqrt {1-\sec (e+f x)}}{\sqrt {2}}\right )|\frac {2 b}{a+b}\right ) \sqrt {\frac {a+b \sec (e+f x)}{a+b}} \tan (e+f x)}{d (c+d) f \sqrt {a+b \sec (e+f x)} \sqrt {-\tan ^2(e+f x)}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 3.06, size = 165, normalized size = 0.79 \[ -\frac {4 \cos ^2\left (\frac {1}{2} (e+f x)\right ) \sqrt {\frac {\cos (e+f x)}{\cos (e+f x)+1}} \sec (e+f x) \sqrt {\frac {a \cos (e+f x)+b}{(a+b) (\cos (e+f x)+1)}} \left ((c+d) F\left (\sin ^{-1}\left (\tan \left (\frac {1}{2} (e+f x)\right )\right )|\frac {a-b}{a+b}\right )-2 c \Pi \left (\frac {c-d}{c+d};\sin ^{-1}\left (\tan \left (\frac {1}{2} (e+f x)\right )\right )|\frac {a-b}{a+b}\right )\right )}{f (c-d) (c+d) \sqrt {a+b \sec (e+f x)}} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[e + f*x]^2/(Sqrt[a + b*Sec[e + f*x]]*(c + d*Sec[e + f*x])),x]

[Out]

(-4*Cos[(e + f*x)/2]^2*Sqrt[Cos[e + f*x]/(1 + Cos[e + f*x])]*Sqrt[(b + a*Cos[e + f*x])/((a + b)*(1 + Cos[e + f
*x]))]*((c + d)*EllipticF[ArcSin[Tan[(e + f*x)/2]], (a - b)/(a + b)] - 2*c*EllipticPi[(c - d)/(c + d), ArcSin[
Tan[(e + f*x)/2]], (a - b)/(a + b)])*Sec[e + f*x])/((c - d)*(c + d)*f*Sqrt[a + b*Sec[e + f*x]])

________________________________________________________________________________________

fricas [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)^2/(c+d*sec(f*x+e))/(a+b*sec(f*x+e))^(1/2),x, algorithm="fricas")

[Out]

Timed out

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sec \left (f x + e\right )^{2}}{\sqrt {b \sec \left (f x + e\right ) + a} {\left (d \sec \left (f x + e\right ) + c\right )}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)^2/(c+d*sec(f*x+e))/(a+b*sec(f*x+e))^(1/2),x, algorithm="giac")

[Out]

integrate(sec(f*x + e)^2/(sqrt(b*sec(f*x + e) + a)*(d*sec(f*x + e) + c)), x)

________________________________________________________________________________________

maple [A]  time = 1.79, size = 236, normalized size = 1.13 \[ -\frac {2 \sqrt {\frac {b +a \cos \left (f x +e \right )}{\cos \left (f x +e \right )}}\, \sqrt {\frac {\cos \left (f x +e \right )}{1+\cos \left (f x +e \right )}}\, \sqrt {\frac {b +a \cos \left (f x +e \right )}{\left (1+\cos \left (f x +e \right )\right ) \left (a +b \right )}}\, \left (1+\cos \left (f x +e \right )\right )^{2} \left (-1+\cos \left (f x +e \right )\right ) \left (\EllipticF \left (\frac {-1+\cos \left (f x +e \right )}{\sin \left (f x +e \right )}, \sqrt {\frac {a -b}{a +b}}\right ) c +\EllipticF \left (\frac {-1+\cos \left (f x +e \right )}{\sin \left (f x +e \right )}, \sqrt {\frac {a -b}{a +b}}\right ) d -2 c \EllipticPi \left (\frac {-1+\cos \left (f x +e \right )}{\sin \left (f x +e \right )}, \frac {c -d}{c +d}, \sqrt {\frac {a -b}{a +b}}\right )\right )}{f \left (b +a \cos \left (f x +e \right )\right ) \sin \left (f x +e \right )^{2} \left (c -d \right ) \left (c +d \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(f*x+e)^2/(c+d*sec(f*x+e))/(a+b*sec(f*x+e))^(1/2),x)

[Out]

-2/f*((b+a*cos(f*x+e))/cos(f*x+e))^(1/2)*(cos(f*x+e)/(1+cos(f*x+e)))^(1/2)*((b+a*cos(f*x+e))/(1+cos(f*x+e))/(a
+b))^(1/2)*(1+cos(f*x+e))^2*(-1+cos(f*x+e))*(EllipticF((-1+cos(f*x+e))/sin(f*x+e),((a-b)/(a+b))^(1/2))*c+Ellip
ticF((-1+cos(f*x+e))/sin(f*x+e),((a-b)/(a+b))^(1/2))*d-2*c*EllipticPi((-1+cos(f*x+e))/sin(f*x+e),(c-d)/(c+d),(
(a-b)/(a+b))^(1/2)))/(b+a*cos(f*x+e))/sin(f*x+e)^2/(c-d)/(c+d)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sec \left (f x + e\right )^{2}}{\sqrt {b \sec \left (f x + e\right ) + a} {\left (d \sec \left (f x + e\right ) + c\right )}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)^2/(c+d*sec(f*x+e))/(a+b*sec(f*x+e))^(1/2),x, algorithm="maxima")

[Out]

integrate(sec(f*x + e)^2/(sqrt(b*sec(f*x + e) + a)*(d*sec(f*x + e) + c)), x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {1}{{\cos \left (e+f\,x\right )}^2\,\sqrt {a+\frac {b}{\cos \left (e+f\,x\right )}}\,\left (c+\frac {d}{\cos \left (e+f\,x\right )}\right )} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(cos(e + f*x)^2*(a + b/cos(e + f*x))^(1/2)*(c + d/cos(e + f*x))),x)

[Out]

int(1/(cos(e + f*x)^2*(a + b/cos(e + f*x))^(1/2)*(c + d/cos(e + f*x))), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sec ^{2}{\left (e + f x \right )}}{\sqrt {a + b \sec {\left (e + f x \right )}} \left (c + d \sec {\left (e + f x \right )}\right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)**2/(c+d*sec(f*x+e))/(a+b*sec(f*x+e))**(1/2),x)

[Out]

Integral(sec(e + f*x)**2/(sqrt(a + b*sec(e + f*x))*(c + d*sec(e + f*x))), x)

________________________________________________________________________________________